ZipPackageReader.FileExists Method

Gets a value indicating whether a file exists in the zipped package.

Parent Type: ZipPackageReader

Namespace: Microsoft.LearningComponents

Assembly: Microsoft.LearningComponents.dll

Syntax
C#

public override bool FileExists (
string filePath

)

Parameters

filePath

The file to check. The path is relative to the root of the file hierarchy in the zipped package. This path should have no URL encoding.

Return Value

true if the file exists; otherwise false if the file does not exist or if the file is a directory.

Exceptions
Exception type Condition
ArgumentException

filePath contains invalid characters.

ArgumentNullException

filePath is null.

InvalidOperationException

The ZipPackageReader is in an error state.

Permissions
Name Description
System.Security.Permissions.FileIOPermission

for reading files. Associated enumeration: System.Security.Permissions.FileIOPermissionAccess.Read.

Remarks

filePath is a relative path to the root of the zipped package.

The zipped package will be exploded into a temporary directory when this method is called, if not done previously.